#include "Character/Character.h"
#include "Cats/CatsManager.h"
#include "CharacterObstacleInstruction.h"

using namespace cocos2d;

//===== DESTRUCTOR =====
CharacterObstacleInstruction::~CharacterObstacleInstruction(void)
{

}

//===== PUBLIC FUNCTIONS =====

/*!
    @function runInstruction
    @param		pCharacter : Character
				modify some value of the Character class
    @result		run instruction to modify Character class
*/
void CharacterObstacleInstruction::runInstruction(Character* pCharacter, CatsManager* pCatsManager)
{
	if( pCharacter != 0 )
	{
		CCLog("Instruction (CharObstacle): Character chance to hit obstacle is %f percent.", _derivedValue);
		pCharacter->updateDirectorObstacle(_derivedValue);
	}
}
